<template>
	<view>
		<block v-if="list.length">	<view class="order_list" v-for="item in list" :key="item.id">
		  <view class="order_title">
		    <view>订单编号:{{item.order_num}}</view>
		    <view>时间:{{$fomartDate(item.orders.createtime).substring(0,10)}}</view>
		  </view>
		  <view class="order_content">
		    <view class="content_left">
		      <view class="user_name">{{item.orders.shou_name}}</view>
		      <view class="order_name">{{item.orders.shou_phone}}</view>
		    </view>
		    <view class="content_price">￥{{$fixed(item.num)}}</view>
		  </view>
		
		</view></block>
	<view v-else class="bitmap">
		<image src="/static/img/no_content.png" mode="widthFix"></image>
		<view>暂时没有订单哦~</view>
	</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[],
				page:1
			}
		},
		methods: {
			getList(){
				this.$get(this.$api.dOrder,{page:this.page},(res)=>{
					let {data}=res;
					if(data.code==1){
						this.list=this.list.concat(data.data.data)
					}
				})
			}
		},
		onLoad() {
			this.getList()
		},
		onReachBottom() {
			this.page++;
			this.getList()
		}
	}
</script>

<style scoped>
page{
  background: #F8F8F8;
}
.order_list{
  background:#fff;
  padding:0 30rpx;
  margin-bottom:15rpx;
}
.order_title{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top:20rpx;
}
.order_title view{
  font-size: 26rpx;
  color: #666666;
}
.order_content{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding:30rpx 0;
  /* border-bottom: 2rpx solid #eee; */
}
.content_left{
  display: flex;
  flex-direction: column;
}
.order_name{
  width: 400rpx;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin-top: 30rpx;
}
.content_price{
  font-size: 60rpx;
  color: #f73333;
  font-weight: bold;
}
/* .order_name{
  width: 120rpx;
  background: #EEEEEE;
  border: 1rpx solid #999999;
  text-align:center;
  font-size: 22rpx;
  color: #333333;
} */
.order_text{
  flex: 1;
  border-top: 1rpx solid #999999;
  border-bottom: 1rpx solid #999999;
  text-align: center;
  font-size: 22rpx;
  color: #333333;
}
.order_text:last-child{
  border-right: 1rpx solid #999999;
}
.order_bottom{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding:20rpx 0;
}
.order_price{
  display: flex;
  align-items: center;
  font-size: 22rpx;
}
.order_price view{
  color: #333;
}
.order_price text{
  color: #FF0000;
}
.bitmap {text-align: center;padding-top: 100rpx;}
	.bitmap image{width: 60%;}
	.bitmap view {color: gray;font-size: 26rpx;margin-top: 30rpx;}
</style>
